home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 9123 < prev    next >
Encoding:
Text File  |  1996-08-05  |  648 b   |  36 lines

  1. Path: surfnet.nl!sun4nl!xs4all!usenet
  2. From: maris@xs4all.nl (Anthony Moendir)
  3. Newsgroups: comp.lang.c
  4. Subject: NEwbie: How to return a multi-dimensional array from function?
  5. Date: Fri, 08 Mar 1996 19:27:17 GMT
  6. Organization: XS4ALL, networking for the masses
  7. Message-ID: <4hp273$8bu@news.xs4all.nl>
  8. NNTP-Posting-Host: ztm01-15.dial.xs4all.nl
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. I want to return a multidimensional array fro a function, 
  12. something like this:
  13.  
  14. char *Foo();
  15.  
  16. int main()
  17. {
  18.  char tmp[10][5];
  19.  
  20.  tmp=Foo();
  21. }
  22.  
  23. char *Foo()
  24. {
  25.  char tmp[10][5];
  26. //do something
  27. return(tmp);
  28. }
  29.  
  30. How should i do that?
  31.  
  32. Any help would be appreciated
  33. Anthony
  34.  
  35.  
  36.